//
//  myMoneyInfoTableViewCell.m
//  WZEfengAndEtong
//
//  Created by 李旭 on 16/9/30.
//  Copyright © 2016年 wanzhao. All rights reserved.
//

#import "myMoneyInfoTableViewCell.h"
#import "UIUtil.h"
@interface myMoneyInfoTableViewCell()
@property (weak, nonatomic) IBOutlet UIImageView *kindImageView;
@property (weak, nonatomic) IBOutlet UILabel *kindName;
@property (weak, nonatomic) IBOutlet UILabel *time;
@property (weak, nonatomic) IBOutlet UILabel *money;
@property (weak, nonatomic) IBOutlet UILabel *allmoney;

@end
@implementation myMoneyInfoTableViewCell
-(void)setInfomodel:(personMoneyInfoModel *)infomodel
{
    _infomodel = infomodel;
    switch (infomodel.kind) {
        case moneyIn:
        {
            self.kindImageView.image = [UIImage imageNamed:@"转入icon"];
            self.kindName.text = @"转入";
            self.money.textColor = [UIColor greenColor];
        }
            break;
        case moneyOut:
        {
            self.kindImageView.image = [UIImage imageNamed:@"转出icon"];
            self.kindName.text = @"转出";
            self.money.textColor = [UIColor blackColor];
        }
            break;
        case redOacketIn:
        {
            self.kindImageView.image = [UIImage imageNamed:@"红包icon"];
            self.kindName.text = @"红包";
            self.money.textColor = [UIColor greenColor];
        }
            break;
        case redPacketOut:
        {
            self.kindImageView.image = [UIImage imageNamed:@"红包icon"];
            self.kindName.text = @"红包";
            self.money.textColor = [UIColor blackColor];
        }
            break;
        case returnMoney:
        {
            self.kindImageView.image = [UIImage imageNamed:@"退款"];
            self.kindName.text = @"退款";
            self.money.textColor = [UIColor greenColor];
        }
            break;
        default:
            break;
    }
    self.time.text = [infomodel.time substringToIndex:infomodel.time.length-2];
    self.money.text = infomodel.money;
    self.allmoney.text = [NSString stringWithFormat:@"%@%@",@"¥",infomodel.blance];

    
}
- (void)awakeFromNib {
    [super awakeFromNib];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
